package com.hongli.blog.service.impl;

import com.hongli.blog.entity.UserDao;
import com.hongli.blog.service.Userservice;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @Author ZERO
 * @Date 2021/11/8 17:26
 **/
@Service
public class Userserviceimpl implements Userservice {

    @Autowired
    private Userservice userservice;

    @Override
    public List<UserDao> SelectAllUser(){
        return userservice.SelectAllUser();
    }

    @Override
    public UserDao SelectUser(String username, String userpassword){
        return userservice.SelectUser(username,userpassword);
    }

    @Override
    public UserDao SelectUserName(int userid){
        return userservice.SelectUserName(userid);
    }

    @Override
    public List<UserDao> SelectUserRole() {
        return userservice.SelectUserRole();
    }

    @Override
    @Transactional(rollbackFor = Exception.class)
    public void Insertuser(UserDao userDao){
        userservice.Insertuser(userDao);
    }
}
